{include file="public/head"/}
<!-- <script language="javascript" src="/static/Admin/js/jquery-ui.min.js"></script> -->
<script language="javascript">
</script>
<div class="container-fluid" id="main">
    <div class="row clearfix" id="search-box" style="margin-top:0">
        <div class="col-md-12 column text-right">
            <div class="form-inline" style="text-align: right;">
                <div class="form-group">
                    <input type="text" class="form-control" id="searchText"  @keyup.13="searchfun" name="searchText" value="" placeholder="{:lang('please_enter_the_product_category_name')}">
                  </div>
                  <div class="form-group">
                      <button type="button" class="btn btn-default" @click="searchfun"><span class="glyphicon glyphicon-search"></span> {:lang('search')}</button>
                  </div>
            </div>
        </div>
    </div>
  <div class="row clearfix">
    <div class="col-md-12 column">
      <div class="alert alert-dismissable alert-info">
        <button type="button" class="close">×</button>
         <p></p>
        </div>
    </div>
   </div>
   
   
  <div class="ntDesktop">
  <div class="ntDesktop-head" v-cloak>{:lang('product_category')}</div>
   
   
   <div class="row clearfix" style="padding-top:12px">
    <div class="col-md-6 column">
        <ul class="nav nav-tabs">
            <li role="presentation" class="active lang" langValue="zh" @click="changelang('zh')">
                <a href="#lang_zh" role="tab" data-toggle="tab" >{:lang('Chinese')}</a>
            </li>
            <li class="lang"  langValue="en" @click="changelang('en')">
            	<a href="#lang_en" data-toggle="tab" id="list-normal" >{:lang('English')}</a>
            </li>
            <li class="lang" langValue="pt" @click="changelang('pt')">
            	<a href="#lang_pu" data-toggle="tab" id="list-pulloff">{:lang('Portuguese')}</a>
            </li>
        </ul>
    </div>
    <div class="col-md-6 column text-right">
    	<div>
        	<a href="{:url('procat/cateAdd',array('request'=>'add'))}" class='btn btn-sm btn-primary' data-toggle="modal" data-target="#procat_editModal"><span class="glyphicon glyphicon-plus"></span>{:lang('add')}</a>
            <span style="padding:10px">&nbsp;</span>
            <button type="button" class="btn btn-default option-del" @click="batchfun(2,'update','batchDel')"><span class="glyphicon glyphicon-remove-circle"></span> {:lang('batch_delete')}</button>
            <button type="button" class="btn btn-default option-recover" @click="batchfun(1,'update','batchRestore')"><span class="glyphicon glyphicon-ok-circle"></span>{:lang('batch_recovery')}</button>
            <button type="button" class="btn btn-danger option-clear" @click="batchfun(9,'deletes','batchClear')"><span class="glyphicon glyphicon-fire"></span> {:lang('batch_clear')}</button>
        </div>
    </div>

  </div>
  <div class="tab-content">
        <div role="tabpanel" class="tab-pane active" id="lang_zh">
                <table class="table table-striped table-hover ntTable" v-cloak>
                      <thead>
                        <tr>
                            <th align="center"><input type="checkbox" @click="cheallsel"/></th>
                            <th> {:lang("product_category_name")} </th>
                            <th> {:lang("product_properties")} </th>
                            <th> {:lang("hide")} </th>
                            <th> {:lang('delete')} </th>
                            <th> {:lang('classify')} </th>
                            <!-- <th> {:lang('universal')} </th> -->
                            <th style="text-align: center;"> {:lang('operate')} </th>
                        </tr>
                      </thead>
                        <tbody >
                         <tr v-for="(item,index) in listdata" :key="item.id+lang">
                             <td><input type="checkbox" @click="onesel(item.id)" /></td>
                             <td :style="{paddingLeft:item.level*30+'px'}">{{item.content}}</td>
                             <td>{{item.proAttrStr}}</td>
                             <td :style="{color: item.is_hide == 'H' ? 'green' : ''}" >{{item.is_hide}}</td>
                             <td :style="{color: item.is_del == 'D' ? 'red' : ''}" >{{item.is_del}}</td>
                             <td>{{item.drank}}</td>
                             <td style="text-align: right;">
                                    <a :href="'/admin/procat/catedetail?id='+item.id+'&pid='+item.pid" class='btn btn-sm btn-primary' data-toggle="modal" data-target="#procat_detailModal"><span class="glyphicon glyphicon-sunglasses"></span> {:lang('details')}</a>
                                    <a :href="'/admin/procat/cateEdit?id='+item.id+'&request=edit&pid='+item.pid" class='btn btn-sm btn-primary' data-toggle="modal" data-target="#procat_editModal"><span class="glyphicon glyphicon-pencil"></span> {:lang('edit')}</a>
                                    <a :href="'/admin/procat/cateAdd?request=addChild&id='+item.id" class='btn btn-sm btn-primary' data-toggle="modal" data-target="#procat_editModal"><span class="glyphicon glyphicon-plus">
                                     </span> {:lang('add')}</a>
                                    <a href="javascript:;" class='btn btn-sm btn-default option-hide' @click="singlefun(item.id,3,'update','batchHide')" v-if="item.status!='3'"><span class="glyphicon glyphicon-eye-close"></span>{:lang("hide")}</a>
                                    <a href="javascript:;" class='btn btn-sm btn-default option-del'  @click="singlefun(item.id,2,'update','batchDel')"  v-if="item.status!='2'"><span class="glyphicon glyphicon-trash"></span> {:lang('delete')}</a>
                                    <a href="javascript:;" class='btn btn-sm btn-default option-recover' @click="singlefun(item.id,1,'update','batchRestore')" v-if="item.status!='1'"><span class="glyphicon glyphicon-heart"></span> {:lang('recovery')}</a>
                                    <a href="javascript:;" class='btn btn-sm btn-danger option-clear' @click="singlefun(item.id,1,'deletes','batchClear')" v-if="item.status=='2'"><span class="glyphicon glyphicon-fire"></span> {:lang('clear')}</a>
                             </td>
                         </tr>
                         <tr v-if="listdata.length==0"><td colspan="6" style="text-align: center;">{:lang('no_data')}</td></tr>
                        </tbody>
                      </table>
                      <ul class="pagination" id="pagination">
                    </ul>
        </div>
      </div>
  </div>
</div>


<!--添加弹窗部分 开始-->


<div class="modal fade" id="procat_editModal" tabindex="-1" role="dialog" aria-labelledby="ntModalLabel" aria-hidden="true"  data-backdrop="static" data-keyboard="false">
    <div class="modal-dialog modal-lg">
        <div class="modal-content" style="width:1000px">
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>

<!--详情弹窗部分 开始-->



<div class="modal fade" id="procat_detailModal" tabindex="-1" role="dialog" aria-labelledby="ntModalLabel" aria-hidden="true">
    <div class="modal-dialog modal-lg">
        <div class="modal-content" style="width:1000px">
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>


<script>
    $("#procat_editModal").on("hidden.bs.modal", function() {
        $(this).removeData("bs.modal");
        $(".modal-content").children().remove();
    });
    $("#procat_detailModal").on("hidden.bs.modal", function() {
        $(this).removeData("bs.modal");
        $(".modal-content").children().remove();
    });
</script> 
<!--弹窗部分 结束-->
<script src="/static/Admin/js/catelist.js"></script>
{include file="public/foot"/}